#! /usr/bin/python
# coding: utf-8
# Filename: filing.py
import os
targetPath = '/Users/kisses/Documents/myPython'
source = '.'
allFiles = os.listdir(source)
for aFile in allFiles:
    if aFile[-3:] == '.py':
        fileName = '/'.join([source,aFile])
        targetName = '/'.join([targetPath,aFile])
        commder = ' '.join(['cp',fileName,targetName])
        if os.system(commder) == 0:
            print u'成功备份',fileName
        else:
            print u'真悲剧没有成功...'
print 'Done'
